﻿package plugin.newguanwei
{
    import com.core.*;

    public class NewGuanWeiCon extends Control
    {

        public function NewGuanWeiCon(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function update(param1:Obproxy, param2:ProxyChange) : void
        {
            if (param1.getName() == "guanwei")
            {
                if (param2.property == "guanzhilingqu")
                {
                    this.target.lingqu();
                }
                else if (param2.property == "duihuancount")
                {
                    this.target.getCount(param2.newvalue);
                }
                else if (param2.property == "SetGuanzhi")
                {
                    if (this.target.visible)
                    {
                        this.target.shengjinguanwei();
                    }
                }
                else if (param2.property == "shengwang")
                {
                    if (this.target.visible)
                    {
                        this.target.getshengwan();
                        this.target.init();
                    }
                    ModelProxy.change("mainview", "updateGuanZhi", null);
                }
                else if (param2.property == "init")
                {
                    if (this.target.visible)
                    {
                        this.target.init();
                    }
                }
                else if (param2.property == "honor")
                {
                    if (this.target.yupei.visible)
                    {
                        this.target.getHonor(param2.newvalue);
                    }
                }
            }
            return;
        }// end function

    }
}
